package com.mars.boss.weixin.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mars.base.service.BaseService;
import com.mars.boss.weixin.entity.WxOAuthUser;
import com.mars.boss.weixin.mapper.WxOAuthUserMapper;
import com.mars.boss.weixin.service.WxOAuthUserService;

@Service
public class WxOAuthUserServiceImpl extends BaseService<WxOAuthUser, Long> implements WxOAuthUserService {
	
	@Autowired
	private WxOAuthUserMapper mapper ;

	@Override
	public WxOAuthUser getUserByOpenId(String openId) {
		return this.mapper.getUserByOpenId(openId) ;
	}

	@Override
	public WxOAuthUser getUserByMobile(String mobile) {
		return this.mapper.getUserByMobile(mobile) ;
	}

	@Override
	public boolean updateUserMobile(String openid, String mobile) {
		this.mapper.updateUserMobile(openid, mobile) ;
		return true;
	}

}
